import 'package:base/main.dart';

extension SizeExtension on num {
  ///[ScreenUtil.setWidth]
  double get w => ScreenUtil.instance.width(this);

  ///[ScreenUtil.setHeight]
  double get h => ScreenUtil.instance.height(this);

  ///[ScreenUtil.setSp]
  double get sp => ScreenUtil.instance.fontSize(this);

  ///屏幕宽度的倍数
  ///Multiple of screen width
  double get sw => ScreenUtil().screenWidth * this;

  ///屏幕高度的倍数
  ///Multiple of screen height
  double get sh => ScreenUtil().screenHeight * this;
}
